package main

import (
	"fmt"
)

var moneyPacket float32

func main() {

	fmt.Println("充值")
	var inputMoney float32
	fmt.Scanln(&inputMoney)
	moneyPacket = moneyPacket + inputMoney
	for {
		fmt.Println("余额：", moneyPacket)
		if moneyPacket < 10 {
			fmt.Println("余额不足")
			return
		}
		bmi()
		moneyPacket = moneyPacket - 10
	}
}
func bmi() {
	var name string
	fmt.Println("名字")
	fmt.Scanln(&name)
	fmt.Println("身高")
	var height float32
	fmt.Scanln(&height)
	fmt.Println("体重")
	var weight float32
	fmt.Scanln(&weight)

	var result = weight / (height * height)

	fmt.Print(name)
	switch {
	case result > 18 && result < 23.5:
		fmt.Println("标准")
	case result < 18 && result > 15:
		fmt.Println("比较瘦")
		fmt.Println("联系健身教练qq：3456789")
	case result < 15:
		fmt.Println("瘦")
	case result > 23.5:
		fmt.Println("胖")
		fmt.Println("联系健身教练qq：1234566789")
	}

}
